package demo01_jdbc;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.sql.DataSource;

/**
 * Created by ztt on 2017/9/18.
 */
@Controller
public class JndiController {

    @Autowired
    private DataSource dataSource;

    @RequestMapping("/login")
    public ModelAndView login(){
        System.out.println("dataSource:"+dataSource);
        ModelAndView mav = new ModelAndView("/login");
        return mav;
    }

}
